/* 
 * File:   immorph.h
 * Author: gustavo
 *
 * Created on July 22, 2011, 4:53 AM
 */

#ifndef IMMORPH_H
#define	IMMORPH_H

#include "../image.h"
#include "../../matrix/matrix.h"

#ifdef	__cplusplus
extern "C" {
#endif
	
	ImpMatrix * imp_strel_disk(float ray, int w);
	
	void imp_image_morph_dilate(ImpMatrix * Mat, ImpMatrix * SE, ImpMatrix ** Dilate);
	void imp_image_morph_dilate_w(ImpMatrix * Mat, int w, ImpMatrix ** Dilate);
	void imp_image_morph_erode(ImpMatrix * Mat, ImpMatrix * SE, ImpMatrix ** Erode);
	
	void imp_image_morph_open(ImpMatrix * Mat, ImpMatrix * SE, ImpMatrix ** Open);
	void imp_image_morph_close(ImpMatrix * Mat, ImpMatrix * SE, ImpMatrix ** Close);
	
	int imp_image_morph_hitmiss(ImpMatrix * Mat, ImpMatrix * SE, ImpMatrix ** HitMiss);
	
	int imp_image_thinning_zhang_suen(ImpMatrix * Mat, ImpMatrix ** Thin, int n);
	int imp_image_thinning_lu_wang(ImpMatrix * Mat, ImpMatrix ** Thin, int n);
	
	int imp_image_thinning_stentiford(ImpMatrix * Mat, ImpMatrix ** Thin, int n);
	
	int imp_image_morph_medial_axis_transform(ImpMatrix * Mat, ImpMatrix ** Thin);
	int imp_image_thin_features(ImpMatrix * Mat, ImpMatrix ** Thin, int n);

#ifdef	__cplusplus
}
#endif

#endif	/* IMMORPH_H */

